<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
        PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:t="http://myfaces.apache.org/tomahawk">

<head>
    <title>Contacts</title>
</head>

<f:view>
<h:form>
    <t:dataTable value="#{contactList.contacts}" var="contactItem"
                 headerClass="standardTable_Header"
                 rowClasses="standardTable_Row1,standardTable_Row2"
                 columnClasses="standardTable_Column,standardTable_Column">

        <h:column>
            <f:facet name="header">
                <t:commandSortHeader columnName="contactItem_title" arrow="true">
                    Name
                </t:commandSortHeader>
            </f:facet>
            #{contactItem.title}
        </h:column>

        <h:column>
            <f:facet name="header">
                <t:commandSortHeader columnName="contactItem_phoneNumber" arrow="true">
                    Phone Number
                </t:commandSortHeader>
            </f:facet>
            #{contactItem.phoneNumber}
        </h:column>

        <h:column>
            <f:facet name="header">
            </f:facet>
            <h:commandLink value="Edit" action="#{contact.edit}">
                <f:param name="id" value="#{contactItem.id}"/>
            </h:commandLink>
        </h:column>
    </t:dataTable>
</h:form>
</f:view>

</html>
